package com.hl.web.fore;

import com.hl.pojo.ArticleCategory;
import com.hl.service.ArticleCategoryService;
import com.hl.util.ResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/articleCategory")
public class ArticleCategoryController {
    @Autowired
    public ArticleCategoryService articleCategoryService;
    @RequestMapping("/add")
    public ResultEntity add(@RequestBody ArticleCategory articleCategory){
        articleCategoryService.add(articleCategory);
        return ResultEntity.ok();
    }
    @RequestMapping("/del")
    public ResultEntity del(@RequestBody ArticleCategory articleCategory){
        articleCategoryService.del(articleCategory);
        return ResultEntity.ok();
    }
    @RequestMapping("/update")
    public ResultEntity update(@RequestBody ArticleCategory articleCategory){
        articleCategoryService.update(articleCategory);
        return ResultEntity.ok();
    }
}
